package com.dq.service.order;

import com.dq.exception.customException.AdminException;
import com.dq.controller.in.OrgOrderQuery;
import com.dq.domain.orders.OrgOrder;
import com.dq.domain.org.Org;

import java.util.List;

/**
 * @author liuhui
 * @date 2019/11/27 0027 13:33:13
 */
public interface OrgOrderService {
    /**
     *多条件查询采购单
     * @param orgOrderQuery
     * @param org
     * @return
     */
    List<OrgOrder> findByWhere(OrgOrderQuery orgOrderQuery, Org org, Long userId)throws AdminException;

    /**
     * 多条件统计采购单数量
     * @param orgOrderQuery
     * @param org
     * @return
     */
    Long countByWhere(OrgOrderQuery orgOrderQuery, Org org, Long userId)throws AdminException;

    /**
     * 采购审核
     * @param yOrNo 确认/拒绝
     * @param remake boss 审核时的备注， 其他无需传值
     * @param orgOrderId
     * @return
     * @throws AdminException
     */
    public OrgOrder check(Boolean yOrNo, String remake, Long orgOrderId) throws AdminException;


    /**
     * 只删除 采购单
     * @param orgOrder
     * @return
     * @throws AdminException
     */
    public OrgOrder update(OrgOrder orgOrder) throws AdminException;
}
